#pragma once
#include<google/protobuf/service.h>
#include<google/protobuf/descriptor.h>
#include<google/protobuf/message.h>
#include"rpcheader.pb.h"
#include<sys/types.h>
#include<sys/socket.h>
#include<error.h>
// #include<bits/in.h>
#include<netinet/in.h>
#include<arpa/inet.h>
#include"mprpcapplication.h"
#include<string>
#include"zookeeperutil.h"

class MprpcChannel:public google::protobuf::RpcChannel{
public:
    //所有通过stub代理对象调用的rpc方法，都走到这里了，统一做rpc方法调用的数据系列化和网络发送
     void CallMethod(const ::google::protobuf::MethodDescriptor* method,
                             ::google::protobuf::RpcController* controller,
                             const ::google::protobuf::Message* request,
                             ::google::protobuf::Message* response,
                             ::google::protobuf::Closure* done);
};